<script type="text/javascript">
		Yutil.useLoadingMessage();
		Yutil.en.enhance();
</script>
<%	
		
		// get parameter enterprise Name
		Set employees = new HashSet();
		try {
			String entId = request.getParameter("enterpriseId");
			Enterprise ent = EnterpriseService.$.getEnterpriseById(Integer.parseInt(entId));
			//get all employee belong
			employees = ent.getEmployees();
		} catch (Exception e) {
			List tmp = EmployeeService.$.getAllEmployee();
			for(Iterator it = tmp.iterator(); it.hasNext();)
				employees.add(it.next()); 
		}
		
		
		UIutil $ = UIutil.$;
%>
<div style="height: 6%">
	<table align='left'>
				<tr>
						<td>
							<input class='button' type="button" onclick="deletePersons()" value="删除人才" />
						</td>
						<td>
							<input class='button' type="button" onclick="backToEnterprise(this)" value="回到企业级" />
						</td>
				</tr>
		</table>
</div>
<p></p>
<fieldset>
		<legend>员工信息</legend>
		<table align="left"  border="1px" class="grid">
				<thead>
						<tr>
								<th>ESMS ID</th>
								<th>员工姓名</th>
						</tr>
				</thead>
				<tbody>
				<%for(Iterator itr = employees.iterator(); itr.hasNext();)
					{
						Employee e = (Employee) itr.next();
				 %>
						<tr>
							<td>E<%=e.getEmployeeId() %></td>
							<td><%=e.getName() %></td>
						</tr>
				<%
					}
				%>
				</tbody>
		</table>
</fieldset>

<br/>

<script type="text/javascript">
		backToEnterprise = function(oElem) {
				var url = 'la_enterprise_list.jsp';
				var myAjax = new Ajax.Updater('right',url,{method:'get', evalScripts: true});
		}
</script> 

<%@ page import="com.esms.struts.service.JspWidget" %> 
<%@ page import="java.util.*" %>
<%@ page import="com.esms.bean.*" %>
<%@ page import="com.esms.struts.service.*" %>
<%@ page language="java" contentType="text/html; charset=utf-8" %>